<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爱心作业</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: skyblue;
        }

        @keyframes heart {
            from {
                top: 0;
                transform: scale(0.4);
                opacity: 0.6;
            }

            50% {
                top: 200px;
                transform: scale(1.5);
                opacity: 1;
            }

            to {
                top: 400px;
                transform: scale(0.4);
                opacity: 0.6;
            }
        }

        .heart {
            position: relative;
            margin: 0 auto;
            width: 100px;
            height: 200px;
            /* background-color:skyblue; */
            animation: heart 2.5s ease-in-out 0s infinite alternate;
            transition-timing-function: linear;
        }

        .heart::before {
            content: '';
            position: absolute;
            right: 7px;
            width: 100px;
            height: 160px;
            background-color: rgb(250, 167, 181);
            border-radius: 50px 50px 0 0;
            transform: rotate(-45deg);
            transform-origin: 50px 100px;
        }

        .heart::after {
            content: '';
            position: absolute;
            left: 7px;
            width: 100px;
            height: 160px;
            background-color: rgb(250, 167, 181);
            border-radius: 50px 50px 0 0;
            transform: rotate(45deg);
            transform-origin: 50px 100px;
        }

        @keyframes shadow {
            0% {
                opacity: 0;
            }

            75% {
                opacity: 0;
            }

            100% {
                opacity: 1;
            }
        }

        .shadow {
            margin: 0 auto;
            margin-top: 340px;
            width: 60px;
            height: 20px;
            background-color: rgba(0, 0, 0, .1);
            border-radius: 50%;
            animation: shadow 2.5s ease-in-out 0s infinite alternate;
            background-image: radial-gradient(ellipse, closest-side at 100% 100%, grey);
        }
    </style>
</head>
<style>

</style>

<body>
    <div class="heart"> </div>
    <div class="shadow"></div>
</body>

</html>